package com.future.hedongjun.mine.order;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.blankj.utilcode.util.LogUtils;
import com.future.baselib.activity.BaseActivity;
import com.future.hedongjun.R;
import com.future.hedongjun.mine.adapter.TimeLineAdapter;
import com.future.hedongjun.mine.utils.KdniaoTrackQueryAPI;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;

public class LogisticsDetailActivity extends BaseActivity {

    @BindView(R.id.recyclerView)
    RecyclerView recyclerView;
    private String logisticsNum;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_logistics_detail);
        ButterKnife.bind(this);
        setTitle("物流信息");
		new Thread(){
            @Override
            public void run() {
                KdniaoTrackQueryAPI api = new KdniaoTrackQueryAPI();
                try {
                    String result = api.getOrderTracesByJson("YTO", "816709330622");
                    LogUtils.d(result);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }.start();
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        ArrayList<String> data = new ArrayList<>();
        data.add("");
        data.add("");
        data.add("");
        data.add("");
        data.add("");
        data.add("");
        data.add("");
        recyclerView.setAdapter(new TimeLineAdapter(data));
    }

    @Override
    protected void getBundleExtras(Bundle extras) {
        super.getBundleExtras(extras);
        logisticsNum = extras.getString("logisticsNum");
    }
}
